﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditSlide.aspx.cs" Inherits="Kiosk.WebManagement.EditSlide"
    ValidateRequest="false" %>

<%@ Register TagPrefix="tinymce" Namespace="Moxiecode.TinyMCE.Web" Assembly="Moxiecode.TinyMCE" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Edit Slide</title>
    <style type="text/css">
        body
        {
            margin: 0px;
            padding: 0px;
        }
        .editButton
        {
            margin: 5px;
        }
        .mceContentBody
        {
            background-image: url(/upload/bg.jpg);
        }
    </style>

    <script type="text/javascript">
        function copySlideContents(txtID, txtHidden)
        {
            var mce = document.getElementById(txtID);
            var hid = document.getElementById(txtHidden);
            hid.Value = mce.innerHTML;            
        }
    </script>

</head>
<body style="background-color: Black;">
    <form id="form1" runat="server">

    <!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
    <tinymce:TextArea ID="txtEditor" theme="advanced" plugins="style,table,kioskImgLib,advimage,advlink,inlinepopups,preview,paste,fullscreen,noneditable,visualchars,xhtmlxtras,template,kioskimagelibrary"
        theme_advanced_buttons1="bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect,|,cut,copy,paste,pastetext,pasteword,"
        theme_advanced_buttons2="bullist,numlist,outdent,indent,blockquote,|,kioskImgLib,image,forecolor,backcolor,removeformat,hr,|,tablecontrols,|,cleanup,code"
        theme_advanced_toolbar_location="top" theme_advanced_toolbar_align="left" theme_advanced_path_location="bottom"
        theme_advanced_resizing="false" convert_fonts_to_spans="false" document_base_url="/upload/"
        convert_urls="false" runat="server" Width="800" Height="680" />

    <div style="text-align: right;">
        <asp:Label ID="lblSaveTime" ForeColor="White" runat="server"></asp:Label>
        <asp:Button ID="btnSave" runat="server" Text="Save Slide" OnClick="btnSave_Click"
            CssClass="editButton" OnClientClick="copySlideContents('{0}', '{1}')" />
        <asp:Button ID="btnClose" runat="server" OnClientClick="window.close()" Text=" Close Editor"
            CssClass="editButton" />
    </div>

    </form>
</body>
</html>
